//
//  FCRelationContentViewController.m
//  customerRelation_Example
//
//  Created by 陈文斌 on 2019/2/15.
//  Copyright © 2019 64912907. All rights reserved.
//

#import "FCRelationContentViewController.h"
#import "Define.h"
#import "FCRelationListViewController.h"

@interface FCRelationContentViewController ()<ManyPageDelegate>

@end

@implementation FCRelationContentViewController
#pragma mark - manyPageDelegate
- (void)scrollViewdidScrollWithScrollView:(UIScrollView *)topscrollView andContentScrollView:(UIScrollView *)contentscrollView andCurrentPage:(int)page {

}

- (BOOL)topBtnClickWithButton:(UIButton *)sender {
    return YES;
}

-(void)resetScrollViewWithTopScrollView:(UIScrollView*)topscrollView andContentScrollView:(UIScrollView*)contentscrollView{
    
}

- (void)setupContentUI{
    // 选择栏
    self.delegate = self;
    
    NSMutableArray *arr = [NSMutableArray array];
    for (FCRelationTypeModel *relationType in self.relationRelationTypes) {
        [arr addObject:relationType.name];
    }
    self.topTitle = [NSArray arrayWithArray:arr];
    self.contentCotrollerArr = [NSMutableArray new];
    for (int i = 0; i < self.topTitle.count; i++) {
        FCRelationTypeModel *relationType = self.relationRelationTypes[i];
        FCRelationListViewController *subViewController = [FCRelationListViewController new];
        subViewController.relationType = relationType;
        [self.contentCotrollerArr addObject:subViewController];
    }
    self.currentPage = 0;
    [self setTableContent];
    [self.contentScrollView setContentOffset:CGPointMake(0, 0) animated:NO];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupContentUI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
